package com.champChooser.panels.application
{
	import com.champChooser.constants.CCConstants;
	import com.champChooser.panels.LoggedInView;
	import com.champChooser.panels.book.bookDemo;
	
	import flash.net.SharedObject;
	
	import mx.containers.VBox;
	import mx.core.Application;
	public class ChampChooserApplication extends Application
	{
		public var loggedInUser:SharedObject;
		public var loggedInView:LoggedInView;
		public var statBook:bookDemo;
		
		public function ChampChooserApplication()
		{
			super();
		}
		
		public function initLoggedInUser(result:Object):void{
			loggedInUser = SharedObject.getLocal(CCConstants.LSO_LOGGED_IN_USER);
			
			loggedInUser.data.userId = result.records.record.id;
			loggedInUser.data.userName = result.records.record.uname;
			loggedInUser.data.currentTeam = result.records.record.currentTeamId;
			loggedInUser.data.reloadUserTeam = true;
		}
		public function reset():void{
			this.currentState = "loggedInState";
		}
		
	}
}